﻿using DataManage;
using System;
using System.Globalization;
using System.Windows.Data;

namespace BMSPlatform.Converter
{
    public class CANTypesSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value is CANSupplierType supplierType)
            {
                switch(supplierType)
                {
                    case CANSupplierType.ZLG:
                        return Collection.ZLGCANTypes;
                    default:
                        throw new NotImplementedException("未找到CAN盒类型");
                }
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
